import React, { FC } from 'react'
import { useNavigate, Link } from 'react-router-dom'

const Home: FC = () => {
  const nav = useNavigate()

  function loginClick() {
    nav('/login')
  }
  return (
    <>
      <p>问卷调查 | 在线投票</p>
      <button onClick={loginClick}>登录</button>
      <Link to="/register">注册</Link>
    </>
  )
}

export default Home
